<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../lib/cropper/cropperImg.css">
    <link rel="stylesheet" href="../lib/cropper/cropper.css">
    <link rel="stylesheet" href="../lib/layui/css/layui.css">
    <link rel="stylesheet" href="../user_css/article_issue.css">
</head>

<body>
    <!-- 卡片区域 -->
    <div class="layui-card">
        <div class="layui-card-header">写文章列表</div>
        <div class="layui-card-body">
            <form class="layui-form" id="form-pub">
                <!-- 发表文章表单 -->
                <div class="layui-form-item">
                    <label class="layui-form-label">文章标题</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" placeholder="请输入标题" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">所有类型</label>
                    <div class="layui-input-block">
                        <select name="cate_id"></select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="layui-form-label">文章内容</label>
                    <div class="layui-input-block" style="height:300px"></div>
                    <textarea id="content" style="display:none"></textarea>
                </div>
                <div class="layui-form-item">
                    <label for="layui-form-label">文章封面</label>
                    <div class="layui-input-block cover-box">
                        <div class="cover-left">
                            <img id="image" src="../img/哈哈.jpg" alt="" />
                        </div>
                        <div class="cover-right">
                            <div class="img-preview"></div>
                            <button type="button" class="layui-btn layui-btn-danger" id="btnChoose">选择封面</button>
                            <!-- 隐藏的文件选择框 -->
                            <input type="file" id="coverFile" style="display:none" accept="image/png.image/jpeg,image/gif" />
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formDemo">发布</button>
                        <button class="layui-btn layui-btn-primary" lay-submit lay-filter="formDemo" id="btnSave">存为草稿</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <!-- 分类模板结构 -->
    <script type="text/html" id="tpl-cate">
        <option value="">请选择文章类别</option>
        {{each data}}
        <option value="{{$value.Id}}">{{$value.name}}</option>
        {{/each}}
    </script>

    <script src="../lib/layui/layui.js"></script>
    <script src="../lib/jquery.min.js"></script>
    <script src="../js/baseAPI.js"></script>
    <script src="../lib/template-web.js"></script>
    <script src="../lib/tinymce/tinymce.min.js"></script>
    <script src="../lib/cropper/cropper.js"></script>
    <script src="../lib/cropper/cropperImg.js"></script>
    <script src="../user_js/article_issue.js"></script>
</body>

</html>